<!DOCTYPE HTML>  
<html lang="en-US">  
<head>  
<meta charset="UTF-8">  
<title>36种漂亮的CSS3网页按钮Button样式</title>  
<style type="text/css">  

    .pagination {
        margin:0px;display: inline-block;padding-left: 0;border-radius: 4px;font-family: 'Open Sans';font-size: 13px;color: #5F5F5F;line-height: 1.5;
    }
    .pagination > li {
        display: inline;
    }
    .pagination > li > a, .pagination > li > span {
        position: relative;
        float: left;
        padding: 6px 12px;
        margin-left: -1px;
        line-height: 1.428571429;
        text-decoration: none;
        background-color: #fff;
        border: 1px solid #ddd;
    }
    .pagination > li > a {
        color: rgb(34, 131, 197);
        background-color: rgb(250, 250, 250);
        margin: 0px -1px 0px 0px;
        border-color: rgb(224, 232, 235);
    }
    .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus {
        background-color: rgb(238, 238, 238);
    }

</style>

               <div class="pagination">
                    {$page}
               </div>
<body>
<?php 
        $where=array('project_id' => $_GET['id'], 'project_type' => '1');
        import('ORG.Util.Page');
		$m=M('Viporder');
        $count = $m->where($where)->count();

        $Page = new Page ($count, 5); // 实例化分页类 传入总记录数和每页显示的记录数

        $Page->setConfig('header', '条记录');

        $Page->setConfig('theme', '<li><a>%totalRow% %header%</a></li> <li>%upPage%</li> <li>%downPage%</li> <li>%first%</li>  <li>%prePage%</li>  <li>%linkPage%</li>  <li>%nextPage%</li> <li>%end%</li> ');//(对thinkphp自带分页的格式进行自定义)

        $show = $Page->show(); // 分页显示输出

        $viporder=$m->limit($Page->firstRow . ',' . $Page->listRows)->where($where)->order("id desc")->select();

        
        $this->assign('viporder', $viporder);
        $this->assign ( "page", $show ); // 赋值分页输出

?>
</body>  
</html>